package com.kinghunt.misp.service.api.userx;

import com.kinghunt.misp.common.dto.common.Tree;
import com.kinghunt.misp.common.dto.userx.OrganizationDTO;
import com.bygoodtech.kings.common.dto.ApiResult;

/**
 * @author jiangtao
 * @date 2019-10-24 00:21.
 */
public interface OrganizationReadService {
    /**
     * 根据ID查询机构信息
     *
     * @param id 机构ID
     * @return 机构信息
     */
    ApiResult<OrganizationDTO> getOrganizationById(Long id);

    /**
     * 查询应用下所有机构树
     *
     * @param appCode 应用code
     * @return 机构树
     */
    ApiResult<Tree<OrganizationDTO>> getOrganizationTree(String appCode);
}
